#include "Server.h"
#include "lxCmdV1.h"

/**
 * @description: 预留
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_0(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}

/**
 * @description: 下发波束测试开始/结束-暗室PC到时序卡、CPU
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_1(struct cmdDataType* cmd,uint8_t * cmdData)
{
    // struct dataType m_cmd;
    uint32_t simple_cnt[4];
    memcpy(simple_cnt,cmdData,sizeof(simple_cnt));
    
    // sxk_tools.controlreg.thread_beam_num = Server::Instance().m_datktsConf.g_Item2;
    if (simple_cnt[0] > 0) {
        Server::Instance().m_sxk.m_datktsConf.m_Item1 = simple_cnt[0];
        Server::Instance().m_sxk.m_datktsConf.m_Item2 = simple_cnt[1];
        Server::Instance().m_sxk.m_datktsConf.m_Item3 = simple_cnt[2];
        Server::Instance().m_sxk.m_datktsConf.m_Item4 = simple_cnt[3];
        Server::Instance().m_sxk.m_sxkHardTest.internal_cnt_hold = simple_cnt[0];
        Server::Instance().m_sxk.darktsSwitch(true);    //开始
    } else {
        Server::Instance().m_sxk.darktsSwitch(false); //结束
    }
    qlog_i("暗室参数 外部采样点:%d,发射波位数:%d,接收波位数:%d",simple_cnt[0],simple_cnt[1],simple_cnt[2]);
    qlog_i("暗室测试类型:%d; 0 接收波束测试,1 发射波束测试 2 收发波束测试",simple_cnt[3]);
    // m_cmd.head = PROTOCOL_HEAD;
    // m_cmd.tail = PROTOCOL_TAIL;
    // m_cmd.cmdType = cmd->cmdType;
    // m_cmd.cmdChildType = cmd->cmdChildType;
    // m_cmd.followData = 0;
    // m_cmd.dataLen = 0;
    //TCP应答
    // return Server::Instance().separate(s_pc,1,(uint8_t *)&m_cmd,sizeof(m_cmd));
    return 0;
}

/**
 * @description: 预留
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_2(struct cmdDataType* cmd,uint8_t * cmdData)
{
    
    return 0;
}
/**
 * @description: 主动上传发射波束测试数据-时序卡到暗室PC 
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_3(struct cmdDataType* cmd,uint8_t * cmdData)
{
    // struct cmdDataType cmdHeader;
    // uint16_t sendnum = 0;  

    return 0;
}
/**
 * @description: CPU上报使用-预留
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_4(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
/**
 * @description: 下发金属球波束测试配置-时序卡、外标校、CPU
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_5(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
/**
 * @description: 下发波束测试开始/结束-测试上位机到时序卡、CPU
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_6(struct cmdDataType* cmd,uint8_t * cmdData)
{
    return 0;
}
/**
 * @description: 预留
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_7(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
/**
 * @description: 预留
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_8(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
/**
 * @description: 预留
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_9(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
/**
 * @description: 下发远场法波束测试配置-时序卡、外标校、CPU
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_10(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
/**
 * @description: 下发波束测试开始/结束-测试上位机到时序卡、CPU
 * @param {cmdDataType*} cmd
 * @param {uint8_t *} cmdData
 * @return {*}
 */
int darkts_callback_11(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}

int darkts_callback_12(struct cmdDataType* cmd,uint8_t * cmdData)
{

    return 0;
}
